package com.mywork.activity;


import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.RelativeLayout;

import com.ciko.code.base.BaseActicity;
import com.mywork.R;

/**
 * Created by ciko on 2015/12/5.
 */
public class WorkManagerBaodangDateUpActivity extends BaseActicity {


    RelativeLayout rl75day;
    RelativeLayout rl60day;
    RelativeLayout rl45day;
    RelativeLayout rl30day;

    @Override
    protected void initTopBar() {
        setTitle("近期到期的保单");
        enableNavLeftImg();
    }

    @Override
    protected void initLayout() {
        setContentView(R.layout.activity_work_manager_baodang_date_up);

    }

    @Override
    protected void initView() {
        rl75day = (RelativeLayout) findViewById(R.id.rl_75day);
        rl60day = (RelativeLayout) findViewById(R.id.rl_60day);
        rl45day = (RelativeLayout) findViewById(R.id.rl_45day);
        rl30day= (RelativeLayout) findViewById(R.id.rl_30day);
    }

    @Override
    protected void initAdapter() {
    }

    @Override
    protected void initDates() {
    }

    @Override
    protected void initListener() {
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
    }

    public void onClick(View view) {
        super.onClick(view);

        if(view==rl75day){
            intent2Detail(75);
        } else if(view ==rl60day){
            intent2Detail(60);
        }
        else if(view ==rl45day){
            intent2Detail(45);
        }
        else if(view ==rl30day){
            intent2Detail(30);
        }

//        switch (view.getId()) {
//            case R.id.rl_75day:
//                intent2Detail(75);
//                break;
//            case R.id.rl_60day:
//                intent2Detail(60);
//                break;
//            case R.id.rl_45day:
//                intent2Detail(45);
//                break;
//            case R.id.rl_30day:
//                intent2Detail(30);
//                break;
//        }
    }

    private void intent2Detail(int day) {
        Intent intent = new Intent(this, WorkManagerBaodangDateUpDetailActivity.class);
        intent.putExtra("DAY", day);
        startActivity(intent);
    }


}
